
#ifndef BBDX9_8D06F90A_27BF_4382_860A_9C226898FF47
#define BBDX9_8D06F90A_27BF_4382_860A_9C226898FF47

#include "bbCFG.h"

class bbDx9
{
private:
	LPDIRECT3D9       g_pD3D;
	LPDIRECT3DDEVICE9 g_pd3dDevice;

	bool bb_CreateFullscreenDevice(HWND bbWindowTarget = NULL, int width = 100, int height = 100, bool vsync = NULL);
	bool bb_CreateWindowedDevice(HWND bbWindowTarget = NULL, int width = 100, int height = 100, bool vsync = NULL);

	bool bbFullScreen;
	bool bbVsync;
	int bbWidth, bbHeight;
	HWND bbTarget;
public:
	bbDx9(HWND bbWindowTarget = NULL, int width = 100, int height = 100, bool fullscreen = NULL, bool vsync = NULL);
	~bbDx9();

	bool bb_CreateDevice();
	void bb_BeginScene(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 0.0f);
	void bb_EndScene();
	LPDIRECT3DDEVICE9 bb_GetDevice() { return g_pd3dDevice; }
};


#endif // BBDX9_8D06F90A_27BF_4382_860A_9C226898FF47
